import { defineStore } from 'pinia'


export const useMenu = defineStore('menu', {
  state: () => {
    return {
      // 所有这些属性都将自动推断出它们的类型
      menuList: [], //菜单树
      routerList: [],//路由信息
    }
  },
  getters: {
    
  },
  actions: {
    // 保存菜单
    setMenuList (data:any) {
      this.menuList = data;
    },
    // 保存路由
    setRouterList (data:any) {
      this.routerList = data;
    },
  },
})